package service

import (
	"github.com/gin-gonic/gin"
)

var router *gin.Engine

func init(){
	router = GetGinRouter()
}

// GinRouteSetup 安装 gin 路由
func GinRouteSetup(){
	InitBookHandler(router)
	InitUserHandler(router)
	InitOrderHandler(router)
}

// GetGinRouter 创建 gin Router
func GetGinRouter()*gin.Engine{
	if router == nil {
		router = gin.Default()
	}
	return router
}